package com.example.a2007dou_shop.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.a2007dou_shop.R
import com.example.a2007dou_shop.entity.CommentEntity
import java.text.SimpleDateFormat

class CommentAdapter(list:MutableList<CommentEntity>):BaseQuickAdapter<CommentEntity,BaseViewHolder>(
    R.layout.item_comment,list) {
    override fun convert(holder: BaseViewHolder, item: CommentEntity) {
        holder.setText(R.id.item_user_name,item.username)
        holder.setText(R.id.item_msg,item.msg)
        holder.setText(R.id.item_time,item.createtime)
        Glide.with(context).load(item.icon).into(holder.getView(R.id.item_user_icon))
    }
}